<include file="Public:header" />

<form class="form-horizontal" action="__URL__/edit_book?id={$book_id}" method="post">
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">书名</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" name="book_name" id="book_name" placeholder="请输入书名.." value="{$book.book_name}">
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">作者</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" name="author" id="author" placeholder="请输入作者.." value="{$book.author}">
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">书籍类型</label>
    <div class="col-sm-10">
      <select class="form-control" name="type_name" id="type_name" placeholder="请选择书籍类型..">
        <option value="" <if condition="$book.type_name eq ''">selected="selected"</if>>请选择书籍类型..</option>
        <foreach name="type_list" item="type" >    
        	<option value="{$type.type_name}" <if condition="$type.type_name eq $book['type_name']">selected="selected"</if>>{$type.type_name}</option>
		</foreach>  
      </select>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">状态</label>
    <div class="col-sm-10">
      <input name="status" type="radio" value="1" <if condition="$book.status eq '1'">checked</if>>已发布
      <input name="status" type="radio" value="0" <if condition="$book.status neq '1'">checked</if>>未发布
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">缩略图</label>
    <div class="col-sm-10">
      <input type="file" class="form-control" name="thumbnail" id="thumbnail" placeholder="请上传缩略图..">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default" name="submit" value="提交">提交</button>
    </div>
  </div>
</form>

<include file="Public:footer" />
